package rottenbren.dev.android.diary.model;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DiaryDay {
	private int year;
	private int month;
	private int day;
	private int weekDay;
	private int lunarYear;
	private int lunarMonth;
	private int lunarDay;
	private String spDayTitle;
	private Aniversary aniversary;
	
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int month) {
		this.month = month;
	}
	public int getDay() {
		return day;
	}
	public void setDay(int day) {
		this.day = day;
	}
	public Date getDate(){
		return new Date(year, month, day);
	}
	
	public String getPatternDate(String pattern){
		SimpleDateFormat sdf = new SimpleDateFormat(pattern);
		return sdf.format(getDate());
	}
	
	public int getWeekDay() {
		return weekDay;
	}
	public void setWeekDay(int weekDay) {
		this.weekDay = weekDay;
	}
	public int getLunarYear() {
		return lunarYear;
	}
	public void setLunarYear(int lunarYear) {
		this.lunarYear = lunarYear;
	}
	public int getLunarMonth() {
		return lunarMonth;
	}
	public void setLunarMonth(int lunarMonth) {
		this.lunarMonth = lunarMonth;
	}
	public int getLunarDay() {
		return lunarDay;
	}
	public void setLunarDay(int lunarDay) {
		this.lunarDay = lunarDay;
	}
	
	public Date getLunarDate(){
		return new Date(lunarYear, lunarMonth, lunarDay);
	}
	
	public String getPatternLunarDate(String pattern){
		SimpleDateFormat sdf = new SimpleDateFormat(pattern);
		return sdf.format(getLunarDate());
	}
	
	public String getSpDayTitle() {
		return spDayTitle == null ? "" : spDayTitle;
	}
	public void setSpDayTitle(String spDayTitle) {
		this.spDayTitle = spDayTitle;
	}
	public Aniversary getAniversary() {
		return aniversary;
	}
	
	public void setAniversary(Aniversary aniversary) {
		this.aniversary = aniversary;
	}
	
}
